package Test;

public class est04 {
    public static void main(String[] args) {
        String s = "abcd12345ed125ss123456789";
        int n = s.length();
        int beg = -1;
        int maxlen = 0;
        int l = 0;
        int r = 0;
        while (r < n) {
            if (s.charAt(r) >= '0' && s.charAt(r) <= '9') {
                while (r < n && s.charAt(r) >= '0' && s.charAt(r) <= '9') {
                    r++;
                }
                if (maxlen < r - l) {
                    maxlen = r - l;
                    beg = l;
                }
                l = r;
                if(r==n) break;
            }
            l++;
            r++;
        }
        System.out.println(s.substring(beg, beg + maxlen ));
    }
}
